#ifndef GDN_WINDOW_H
#define GDN_WINDOW_H

#include <queue>
#include <string>
#include <SFML/Graphics.hpp>

#include "gdn/InputManager.h"
#include "gdn/Event.h"
#include "gdn/Vector2.h"
#include "gdn/Color.h"
#include "gdn/Sprite.h"
#include "gdn/Text.h"

namespace gdn
{
	class Window
	{
		public:
			~Window();


			void Create( const Vector2i& theSize, unsigned int theBpp, const std::string& theTitle );
			void Close();

			bool IsOpen() const;


			const InputManager& GetInput() const;

			bool GetEvent( Event& event );
			Event PeekEvent() const;
			void PopEvent() const;
			bool HasEvent() const;


			void Clear();
			void Draw( const Sprite& draw );
			void Draw( const Text& draw );
			//virtual void Draw( const BitmapText& draw ); // Maybe in the future, but not right now.
			void Display();

			//Image GetScreenshot() const;


			std::string GetWindowTitle() const;
			void SetWindowTitle( const std::string& theTitle );

			Vector2i GetWindowPosition() const;
			void SetWindowPosition( const Vector2i& thePos );

		protected:
			sf::RenderWindow window;
			mutable std::queue< Event > events;
			InputManager input;
			std::string title;
			sf::Vector2i pos;
	};
}

#endif // GDN_WINDOW_H
